package org.csu.wuliu.service;

import org.csu.wuliu.domain.Admin;
import org.csu.wuliu.persistence.AdminMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AdminService {
    @Autowired
    private AdminMapper adminMapper;

    public Admin getAdminById(String adminId){
        return adminMapper.getAdminByAdminId(adminId);
    }

    public Admin getAdminByIdAndPassword(Admin admin){
        return adminMapper.getAdminByAdminIdAndPassword(admin);
    }


    public void insertAdmin(Admin admin){
        adminMapper.insertAdmin(admin);
    }

    public void updateAdmin(Admin admin){
        adminMapper.updateAdmin(admin);
    }

    public void deleteAdmin(Admin admin){
        adminMapper.deleteAdmin(admin);
    }




}
